package com.experience.we.lambda;

import java.util.Arrays;
import java.util.Comparator;
import java.util.List;

public class MethodReference {
	
	public static void main(String[] args) {
		List<Apple> apl = Arrays.asList(new Apple("green",120),new Apple("green", 150),new Apple("red",90));
		apl.forEach(System.out::println);
		apl.sort(Comparator.comparing(Apple::getWeight));
		System.out.println(apl);
	}
}
